package codej.ast;

import static codej.ast.Option.*;
import codej.ast.*;

public class NextVariableDeclaration extends AbstractNode {

	private final String op;
	private final VariableDeclaration nextVariableDeclaration;

	public void accept(Visitor visitor) {
		visitor.visit(this);
	}

	public NextVariableDeclaration(String op, VariableDeclaration nextVariableDeclaration) {
		this.op = op;
		this.nextVariableDeclaration = nextVariableDeclaration;
	}

	public String getOperator() {
		return op;
	}

	public VariableDeclaration getNextVariableDeclaration() {
		return option(nextVariableDeclaration, new VariableDeclaration());
	}

}
